<%@ page contentType="text/html; charset=UTF-8" language="java"%>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<html:html>
<head>
<META http-equiv=Pragma content=no-cache>
<META http-equiv=Cache-Control content=no-cache>
<META http-equiv=Expires content=0>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="../../style/css/private.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="../../style/scripts/private.js"  language="JavaScript"></script>
<script type="text/javascript" src="../../style/scripts/pageCheck.js"  language="JavaScript"></script>
<script language="javascript1.2">
	function operation1(){
		if(validateActionForm(document.forms[0])){
			window.document.forms[0].operationType.value = "submit";
			window.document.forms[0].submit();
		}
	}
</script>
</head>

<body marginheight="0" marginwidth="0" bottommargin="0" topmargin="0">
<html:form method="post" action="/pages/F09/F0901RightOrg.do" enctype="multipart/form-data">
<html:hidden property="operationType"/>
<html:hidden property="PARENTID"/>
<html:hidden property="ORGID" name="F0901OrgActionForm"/>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
	<tr>
		<td><table width="100%" border="0" align="center" cellpadding="1" cellspacing="1">
			<tr>
				<td width="5%" nowrap><table width="60" border="0" cellspacing="0" cellpadding="0" class="toolbar">
					<tr>
						<td align="center" nowrap="nowrap"><a href="#" onClick="javascript:operation('back');">返回</a></td>
					</tr>
				</table></td>
				
				<td width="5%" nowrap><table width="60" border="0" cellspacing="0" cellpadding="0" class="toolbar">
					<tr>
						<td align="center" nowrap="nowrap"><a href="javascript:operation1();">保存</a></td>
					</tr>
				</table></td>
				<td width="90%">&nbsp;</td>
			</tr>
		</table></td>
	</tr>
	<tr>
		<td valign="top"><table width="100%" border="1" cellspacing="0" cellpadding="0" align="center" bordercolordark="#FFFFFF" bordercolorlight="#333333">
		 	<tr>
				<td colspan="6" class="list_td"><strong>&nbsp;&nbsp;请输入机构信息</strong></td>
			</tr>		
			<tr>
				<td width="12%" align="center"  class="list_td">代&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;码</td>
				<td width="38%" ><html:text property="CODE" styleClass="input_text_m" maxlength="50" /></td>
				<td width="12%" align="center"  class="list_td">机构名称</td>
				<td width="38%" ><html:text property="NAME" styleClass="input_text_m" maxlength="50" /></td>
			</tr>
		   <tr>
		  		<td align="center"  class="list_td">上级机构</td>
				<td colspan="3"><html:text property="PARENTNAME" name="F0901OrgActionForm" styleClass="input_text_m" maxlength="50" readonly="true"/></td>
		   </tr>
		   <tr>
			   <td align="center" class="list_td">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注</td>
			   <td colspan="3"><html:textarea property="NOTES" cols="100" rows="5" styleClass="input_textarea"/></td>
		   </tr>
		</table></td>
	</tr> 	
</table>
<html:messages id="aa" message="true"><bean:message key="errors.prefix"/><bean:write name="aa"/><bean:message key="errors.suffix"/></html:messages>
</html:form>
</body>
<script language="Javascript1.2" type="text/javascript">
	function validateActionForm(form) { 
		return validateMinLength(form)&&validateMaxLength(form)&&validateRequired(form);
	} 

    function minlength() { 
    	//this.aa = new Array("CODE", "代码 长度应为2位！", new Function ("varName", "this.minlength='2';  return this[varName];"));
    }  

	function maxlength(){
		this.aa = new Array("CODE", "代码 长度大于15位！", new Function ("varName", "this.maxlength='15';  return this[varName];"));
		this.bb = new Array("NAME", "机构名称 长度大于50个汉字！", new Function ("varName", "this.maxlength='100';  return this[varName];"));
	}
	
	function required(){
		this.aa = new Array("CODE", "代码 不能为空！", new Function ("varName", "this.nullable='false';  return this[varName];"));
		this.bb = new Array("NAME", "机构名称 不能为空！", new Function ("varName", "this.nullable='false';  return this[varName];"));
	}
</script>
</html:html>